.class public Lt4j/data/Venue;
.super Ljava/lang/Object;
.source "Venue.java"


# instance fields
.field private address:Ljava/lang/String;

.field private city:Ljava/lang/String;

.field private coordinates:[D

.field private name:Ljava/lang/String;

.field private province:Ljava/lang/String;

.field private state:Ljava/lang/String;


# direct methods
.method public constructor <init>(Lt4j/org/json/JSONObject;)V
    .locals 6
    .parameter "json"
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lt4j/TBlogException;
        }
    .end annotation

    .prologue
    .line 98
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 51
    const/4 v2, 0x2

    new-array v2, v2, [D

    iput-object v2, p0, Lt4j/data/Venue;->coordinates:[D

    .line 101
    :try_start_0
    const-string v2, "name"

    invoke-virtual {p1, v2}, Lt4j/org/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lt4j/data/Venue;->name:Ljava/lang/String;

    .line 102
    const-string v2, "address"

    invoke-virtual {p1, v2}, Lt4j/org/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lt4j/data/Venue;->address:Ljava/lang/String;

    .line 103
    const-string v2, "city"

    invoke-virtual {p1, v2}, Lt4j/org/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lt4j/data/Venue;->city:Ljava/lang/String;

    .line 104
    const-string v2, "province"

    invoke-virtual {p1, v2}, Lt4j/org/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lt4j/data/Venue;->province:Ljava/lang/String;

    .line 105
    const-string v2, "state"

    invoke-virtual {p1, v2}, Lt4j/org/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lt4j/data/Venue;->state:Ljava/lang/String;

    .line 107
    const-string v2, "coordinates"

    invoke-virtual {p1, v2}, Lt4j/org/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lt4j/org/json/JSONArray;

    move-result-object v0

    .line 109
    .local v0, coordinates:Lt4j/org/json/JSONArray;
    iget-object v2, p0, Lt4j/data/Venue;->coordinates:[D

    const/4 v3, 0x0

    const/4 v4, 0x0

    invoke-virtual {v0, v4}, Lt4j/org/json/JSONArray;->getDouble(I)D

    move-result-wide v4

    aput-wide v4, v2, v3

    .line 110
    iget-object v2, p0, Lt4j/data/Venue;->coordinates:[D

    const/4 v3, 0x1

    const/4 v4, 0x1

    invoke-virtual {v0, v4}, Lt4j/org/json/JSONArray;->getDouble(I)D

    move-result-wide v4

    aput-wide v4, v2, v3
    :try_end_0
    .catch Lt4j/org/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    .line 114
    return-void

    .line 111
    .end local v0           #coordinates:Lt4j/org/json/JSONArray;
    :catch_0
    move-exception v1

    .line 112
    .local v1, e:Lt4j/org/json/JSONException;
    new-instance v2, Lt4j/TBlogException;

    invoke-direct {v2, v1}, Lt4j/TBlogException;-><init>(Ljava/lang/Exception;)V

    throw v2
.end method

.method public static createVenueList(Lt4j/http/Response;)Ljava/util/List;
    .locals 6
    .parameter "res"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lt4j/http/Response;",
            ")",
            "Ljava/util/List",
            "<",
            "Lt4j/data/Venue;",
            ">;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lt4j/TBlogException;
        }
    .end annotation

    .prologue
    .line 119
    :try_start_0
    invoke-virtual {p0}, Lt4j/http/Response;->asJSONArray()Lt4j/org/json/JSONArray;

    move-result-object v1

    .line 120
    .local v1, jsonArray:Lt4j/org/json/JSONArray;
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 122
    .local v3, venues:Ljava/util/List;,"Ljava/util/List<Lt4j/data/Venue;>;"
    const/4 v0, 0x0

    .local v0, i:I
    :goto_0
    invoke-virtual {v1}, Lt4j/org/json/JSONArray;->length()I

    move-result v4

    if-lt v0, v4, :cond_0

    .line 125
    return-object v3

    .line 123
    :cond_0
    new-instance v4, Lt4j/data/Venue;

    invoke-virtual {v1, v0}, Lt4j/org/json/JSONArray;->getJSONObject(I)Lt4j/org/json/JSONObject;

    move-result-object v5

    invoke-direct {v4, v5}, Lt4j/data/Venue;-><init>(Lt4j/org/json/JSONObject;)V

    invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
    :try_end_0
    .catch Lt4j/org/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    .line 122
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    .line 126
    .end local v0           #i:I
    .end local v1           #jsonArray:Lt4j/org/json/JSONArray;
    .end local v3           #venues:Ljava/util/List;,"Ljava/util/List<Lt4j/data/Venue;>;"
    :catch_0
    move-exception v2

    .line 127
    .local v2, jsone:Lt4j/org/json/JSONException;
    new-instance v4, Lt4j/TBlogException;

    invoke-direct {v4, v2}, Lt4j/TBlogException;-><init>(Ljava/lang/Exception;)V

    throw v4
.end method


# virtual methods
.method public getAddress()Ljava/lang/String;
    .locals 1

    .prologue
    .line 68
    iget-object v0, p0, Lt4j/data/Venue;->address:Ljava/lang/String;

    return-object v0
.end method

.method public getCity()Ljava/lang/String;
    .locals 1

    .prologue
    .line 74
    iget-object v0, p0, Lt4j/data/Venue;->city:Ljava/lang/String;

    return-object v0
.end method

.method public getCoordinates()[D
    .locals 1

    .prologue
    .line 92
    iget-object v0, p0, Lt4j/data/Venue;->coordinates:[D

    return-object v0
.end method

.method public getLatitude()D
    .locals 2

    .prologue
    .line 54
    iget-object v0, p0, Lt4j/data/Venue;->coordinates:[D

    const/4 v1, 0x0

    aget-wide v0, v0, v1

    return-wide v0
.end method

.method public getLongitude()D
    .locals 2

    .prologue
    .line 58
    iget-object v0, p0, Lt4j/data/Venue;->coordinates:[D

    const/4 v1, 0x1

    aget-wide v0, v0, v1

    return-wide v0
.end method

.method public getName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 62
    iget-object v0, p0, Lt4j/data/Venue;->name:Ljava/lang/String;

    return-object v0
.end method

.method public getProvince()Ljava/lang/String;
    .locals 1

    .prologue
    .line 80
    iget-object v0, p0, Lt4j/data/Venue;->province:Ljava/lang/String;

    return-object v0
.end method

.method public getState()Ljava/lang/String;
    .locals 1

    .prologue
    .line 86
    iget-object v0, p0, Lt4j/data/Venue;->state:Ljava/lang/String;

    return-object v0
.end method

.method public setAddress(Ljava/lang/String;)V
    .locals 0
    .parameter "address"

    .prologue
    .line 71
    iput-object p1, p0, Lt4j/data/Venue;->address:Ljava/lang/String;

    .line 72
    return-void
.end method

.method public setCity(Ljava/lang/String;)V
    .locals 0
    .parameter "city"

    .prologue
    .line 77
    iput-object p1, p0, Lt4j/data/Venue;->city:Ljava/lang/String;

    .line 78
    return-void
.end method

.method public setCoordinates([D)V
    .locals 0
    .parameter "coordinates"

    .prologue
    .line 95
    iput-object p1, p0, Lt4j/data/Venue;->coordinates:[D

    .line 96
    return-void
.end method

.method public setName(Ljava/lang/String;)V
    .locals 0
    .parameter "name"

    .prologue
    .line 65
    iput-object p1, p0, Lt4j/data/Venue;->name:Ljava/lang/String;

    .line 66
    return-void
.end method

.method public setProvince(Ljava/lang/String;)V
    .locals 0
    .parameter "province"

    .prologue
    .line 83
    iput-object p1, p0, Lt4j/data/Venue;->province:Ljava/lang/String;

    .line 84
    return-void
.end method

.method public setState(Ljava/lang/String;)V
    .locals 0
    .parameter "state"

    .prologue
    .line 89
    iput-object p1, p0, Lt4j/data/Venue;->state:Ljava/lang/String;

    .line 90
    return-void
.end method
